package com.project.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.project.bean.SaleOrderBean;
import com.project.service.ISaleOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDate;

@RestController
@RequestMapping("saleOrder")
public class SaleOrderController {
    @Autowired
    private ISaleOrderService service;

    @RequestMapping("findByItem")
    public IPage<SaleOrderBean> findByItem(Integer pageNO, String clientName, LocalDate startDate, LocalDate endDate) {
        return service.findByItem(pageNO, clientName, startDate,endDate);
    }
    @RequestMapping("findById")
    public SaleOrderBean findById(Integer saleOrderId) {
        return service.findById(saleOrderId);
    }
}
